﻿@using HawaiRestaurant.Models.Helper
@model HawaiRestaurant.Models.DataContext.Food

@{
    ViewBag.Title = "EditFood";
    Layout = "~/Views/Shared/_LayoutAdmin.cshtml";
}

<h2>Edit Food</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.core.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.ui.datepicker.js")" type="text/javascript"></script>
@section MyOtherJavascript {
    <script type="text/javascript">
        $(document).ready(function() {
            $('#ModifiedDate').datepicker();
        });
    </script>
}

 @using (Html.BeginForm("EditFood", "Admin", FormMethod.Post, new { @class = "niceform" }))
   {
       @Html.ValidationSummary(true)
       <fieldset>
   @Html.HiddenFor(model => model.FoodId)
         
   
           <dl >
               <dt>
                   <label for="name">Food Name:</label>
               </dt>
               <dd>
            
                   @Html.EditorFor(model => model.Name)
                   @Html.ValidationMessageFor(model => model.Name)
               </dd>
           </dl>
              <dl >
               <dt>
                   <label for="name">Image :</label>
               </dt>
                  <dd>    @Html.EditorFor(model => model.Image)
                   @Html.ValidationMessageFor(model => model.Image)</dd>
           </dl>

           <dl >
               <dt>
                   <label for="name">Description:</label>
               </dt>
               <dd>
            
                   @Html.EditorFor(model => model.Descriptions)

                   @Html.ValidationMessageFor(model => model.Descriptions)
               </dd>
           </dl>
           
           <dl >
               <dt>
                   <label for="name">Food Type:</label>
               </dt>
               <dd>
                   @Html.DropDownList("FoodTypeId",string.Empty)
                   @Html.ValidationMessageFor(model => model.FoodTypeId) 
               </dd>
           </dl>
           
           <dl >
               <dt>
                   <label for="name">Food Unit:</label>
               </dt>
               <dd>
            
                   @Html.EditorFor(model => model.FoodUnit)
                   @Html.ValidationMessageFor(model => model.FoodUnit)
               </dd>
           </dl>
           
           <dl >
               <dt>
                   <label for="name">Modified Date:</label>
               </dt>
               <dd>
            
                   @Html.EditorFor(model => model.ModifiedDate)
                   @Html.ValidationMessageFor(model => model.ModifiedDate)
               </dd>
           </dl>
           <dl >
               <dt>
                   <label for="name">Standard Price:</label>
               </dt>
               <dd>
            
              @Html.EditorFor(model => model.StandardPrice)
            @Html.ValidationMessageFor(model => model.StandardPrice)
               </dd>
           </dl>
           <dl class="submit" style="margin-left: -50px">
               <dd>
                   <input id="submit" class="NFButton" type="submit" value="Submit" name="submit"> 
               </dd>
           </dl>
       
       </fieldset>
   }
<div>
    @Html.ActionLink("Back to List", "ListFood")
</div>











